package com.chixing.day10.ExpectionsDemo;

import java.sql.SQLException;

public class HandlerExceptionDemo {
    public static void main(String[] args) throws SQLException ,BalancdNotEnoughException{
        fun4();
    }
    public static void fun4(){
        BankDEMO ba = new BankDEMO();
        ba.setAccBalance(150);
        try{
                    System.out.println("try1");
                    int a = 10/0;
                    System.out.println("try2");

                } catch (ArithmeticException e) {
            System.out.println("模拟除数不能为0 处理的逻辑.......");
        }
        System.out.println("xxxxxxxxxxxxxxxxxx");
         try {
             BankDEMO.class.getField(" ").get(null);
         }catch (IllegalAccessException e){
             e.printStackTrace();
         }catch (NoSuchFieldException e){
             e.printStackTrace();
         } catch (Exception e){
              e.printStackTrace();
         }
    }
    public static void fun1() throws SQLException {

    }
    public static void fun2() throws BalancdNotEnoughException{
        fun3();
    }
    public static void fun3() throws BalancdNotEnoughException {
        
    }
}
